﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Administrador.Master" AutoEventWireup="true" CodeBehind="UI_NewCode.aspx.cs" Inherits="Espam.Idiomas.Decimo.Tesis.Web.UI_NewCode" EnableEventValidation="false" ViewStateEncryptionMode="Never" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
   <%-- <link href="js/nuevos/media/css/dataTables.bootstrap.css" rel="stylesheet" />
    <link href="js/nuevos/media/css/dataTables.bootstrap.min.css" rel="stylesheet" />--%>
    <%--<link href="js/nuevos/media/css/dataTables.foundation.css" rel="stylesheet" />
    <link href="js/nuevos/media/css/dataTables.foundation.min.css" rel="stylesheet" />--%>
    
 <%--   <link href="js/nuevos/media/css/jquery.dataTables_themeroller.css" rel="stylesheet" />--%>
    <link href="css/Estilo.css" rel="stylesheet" />
     <style type="text/css">
        .fontDt {
            font-size: 9px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Contenido" runat="server">
  <%--  <script src="js/nuevos/media/js/jquery.js"></script>
    <script src="js/nuevos/media/js/dataTables.foundation.min.js"></script>
    <script src="js/nuevos/media/js/dataTables.foundation.js"></script>
    <script src="js/nuevos/media/js/dataTables.bootstrap.min.js"></script>
    <script src="js/nuevos/media/js/dataTables.bootstrap.js"></script>--%>

       <script type="text/javascript">
          window.onload = function () {
              var seconds = 3;
              setTimeout(function () {
                  document.getElementById("<%=lblvalida.ClientID %>").style.display = "none";
                 }, seconds * 1000);
          };

         
          //$(document).ready(function () {
          //    $('.gvdatatable').dataTable({});
          //});
</script>
    <script>
        $(document).ready(function () {
            $('#<%=gvCodigos.ClientID%>').dataTable({
                bJQueryUI: true
            });
        })
      </script>
       <cc1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
    </cc1:ToolkitScriptManager>
     <div id="page-wrapper">

            <div class="page-content">

                <!-- begin PAGE TITLE AREA -->
                <!-- Use this section for each page's title and breadcrumb layout. In this example a date range picker is included within the breadcrumb. -->
                <div class="row">
                    <div class="col-lg-12">
                        <div class="page-title">
                            <h1>Códigos
                                <small>Nuevo Código</small>
                            </h1>
                            <ol class="breadcrumb">
                                <li class="active">
                                 <asp:Label ID="lblvalida" runat="server" Text="" Visible="False"></asp:Label></li>
                                <li class="pull-right">
                                    <div id="reportrange" class="btn btn-green btn-square date-picker">
                                        <i class="fa fa-calendar"></i>
                                        <span class="date-range"></span> <i class="fa fa-caret-down"></i>
                                    </div>
                                </li>
                            </ol>
                        </div>
                    </div>
                    <!-- /.col-lg-12 -->
                </div>
                <!-- /.row -->
                <!-- end PAGE TITLE AREA -->
            </div>
          <!-- end PAGE TITLE ROW -->
                <div class="row">
               <!-- Validation Examples -->
                    <div class="col-lg-12">
                        <div class="portlet portlet-default">
                            <div class="portlet-heading">
                                <div class="portlet-title">
                                    <h4>Datos Nuevo Código</h4>
                                </div>
                                <div class="portlet-widgets">
                                    <a data-toggle="collapse" data-parent="#accordion" href="#validationExamples"><i class="fa fa-chevron-down"></i></a>
                                </div>
                                <div class="clearfix"></div>
                            </div>
                            <div id="validationExamples" class="panel-collapse collapse in">
                                <div class="portlet-body">
                                   
                                <div class="portlet-body">
                                <div class="table-responsive">
                                    <table class="table">
                                        <thead>
                                            <tr>
                                                <td>C&oacute;digo:</td>
                                                <td> <asp:TextBox ID="txtCodigo" autocomplete="off" runat="server" CssClass="form-control"  placeholder="Ingrese Código" Style="text-transform:uppercase" MaxLength="1"></asp:TextBox>
                                                   <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" TargetControlID="txtCodigo" FilterType="UppercaseLetters,LowercaseLetters"></cc1:FilteredTextBoxExtender>
                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Campo Obligatorio" ControlToValidate="txtCodigo" ForeColor="Red" ></asp:RequiredFieldValidator>
                                                </td>
                                                <td>Equivalente:</td>
                                                <td>
                                                    <asp:TextBox ID="txtEquivalente" autocomplete="off" runat="server" CssClass="form-control"  placeholder="Ingrese Equivalencia" Style="text-transform:uppercase"></asp:TextBox>
                                                   <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender2" runat="server" TargetControlID="txtEquivalente" FilterType="UppercaseLetters,LowercaseLetters"></cc1:FilteredTextBoxExtender>
                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="Campo Obligatorio" ControlToValidate="txtEquivalente" ForeColor="Red" ></asp:RequiredFieldValidator>
                                                </td>
                                            </tr>
                                        </thead>
                                        <tbody>
                                           <%--</form>--%>
                                            <tr>
                                                <td></td>
                                                <td></td>
                                                <td><asp:Button ID="btnCancelar" runat="server" Text="Cancelar" Visible="false" CssClass="btn btn-block" OnClick="btnCancelar_Click"/></td>
                                                <td><asp:Button ID="btnGuardarCodigo" runat="server" Text="Guardar Código" CssClass="btn btn-dark-blue" OnClick="btnGuardarCodigo_Click" /></td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- /.col-lg-12 -->
                    <!-- End Validation Examples -->
             </div>

                <!-- /.row -->

         <div class="row">
               <!-- Validation Examples -->
                    <div class="col-lg-12">
                        <div class="portlet portlet-default">
                            <div class="portlet-heading">
                                <div class="portlet-title">
                                    <h4>C&oacute;digos Guardados</h4>
                                </div>
                                <div class="clearfix"></div>
                            </div>
                            <div id="Div1" class="panel-collapse collapse in">
                                <div class="portlet-body" >
                                   
                                <div class="portlet-body">
                                     
                                     <div class="table-responsive">
                                    <%-- <table class="table">--%>
                               <%-- </div>--%>
                                  <!-- gridview modulos -->

                                  <!-- End gridview modulos -->
                                      <%--    BackColor="White" BorderColor="#336666" 
                                        BorderStyle="Double"
                                           AllowPaging="True" 
                                          Width="100%" 
                                          AutoGenerateColumns="False" CellPadding="4" GridLines="Horizontal" --%>
                                    <%--</form>--%>

                                    <asp:GridView ID="gvCodigos" 
                                         BackColor="White" BorderColor="#336666" 
                                        BorderStyle="Double"
                                           AllowPaging="True" 
                                          Width="100%" 
                                          AutoGenerateColumns="False" CellPadding="4" GridLines="Horizontal"
                                        runat="server"
                                         DataKeyNames="idCodigo" 
                                        
                                        BorderWidth="3px" 
                                        OnSelectedIndexChanged="gvCodigos_SelectedIndexChanged"
                                        >
                                        <Columns>
                                            <asp:BoundField DataField="codigo" HeaderText="CÓDIGO" >
                                            <HeaderStyle HorizontalAlign="Center"/>
                                            </asp:BoundField>
                                            <asp:BoundField DataField="equivalente" HeaderText="EQUIVALENTE" />
                                            <asp:CommandField ShowSelectButton="True" ButtonType="Image" SelectImageUrl="~/Images/1415847473_file_edit.png" />
                                        </Columns>
                                        <FooterStyle BackColor="White" ForeColor="#333333" />
                                        <HeaderStyle BackColor="#34495E" Font-Bold="True" ForeColor="White" />
                                        <PagerStyle BackColor="#336666" ForeColor="White" HorizontalAlign="Center" />
                                        <RowStyle BackColor="White" ForeColor="#333333" />
                                        <SelectedRowStyle BackColor="#339966" Font-Bold="True" ForeColor="White" />
                                        <SortedAscendingCellStyle BackColor="#F7F7F7" />
                                        <SortedAscendingHeaderStyle BackColor="#487575" />
                                        <SortedDescendingCellStyle BackColor="#E5E5E5" />
                                        <SortedDescendingHeaderStyle BackColor="#275353" />
                                    </asp:GridView>

                                         <%--OnLoad="gvCodigos_Load" OnPreRender="gvCodigos_PreRender"--%>
                                         <%--CssClass="mGrid" PagerStyle-CssClass="pgr" AlternatingRowStyle-CssClass="alt"--%>

                                         <%-- OnLoad="gvCodigos_Load" OnPreRender="gvCodigos_PreRender"--%>


                              <%--      <asp:GridView ID="gvCodigos" AutoGenerateColumns="false" runat="server" 
                                        Width="100%"
                                        DataKeyNames="idCodigo"
                                        OnSelectedIndexChanged="gvCodigos_SelectedIndexChanged"
                                        >
                                            <Columns>
                                                <asp:BoundField DataField="codigo" HeaderText="CÓDIGO" >
                                                </asp:BoundField>
                                                <asp:BoundField DataField="equivalente" HeaderText="EQUIVALENTE" />
                                                <asp:CommandField ShowSelectButton="True" ButtonType="Image" SelectImageUrl="~/Images/1415847473_file_edit.png" />
                                        </Columns>
                                    </asp:GridView>--%>


                                         <%--<asp:GridView ID="gvCodigos" 
                                          AutoGenerateColumns="false" 
                                          runat="server"
                                          CssClass="gvdatatable"
                                          OnPreRender="gvCodigos_PreRender">
                                             <Columns>
                                            <asp:BoundField DataField="codigo" HeaderText="CÓDIGO" >
                                            <HeaderStyle HorizontalAlign="Center"/>
                                            </asp:BoundField>
                                            <asp:BoundField DataField="equivalente" HeaderText="EQUIVALENTE" />
                                            <asp:CommandField ShowSelectButton="True" ButtonType="Image" SelectImageUrl="~/Images/1415847473_file_edit.png" />
                                        </Columns>
                                    </asp:GridView>--%>

                                        <%-- </table>--%>
                            </div>
                                    </div>
                                         <%--</form>--%>
                                </div>
                            </div>
                        </div>
                    </div>
 
                    <!-- /.col-lg-12 -->
                    <!-- End Validation Examples -->
             </div>
                <!-- /.row -->
     </div>
</asp:Content>
